A Logic Programming Approach to Manipulating Formulas and Programs

نویسندگان

  • Dale Miller
  • Gopalan Nadathur
چکیده

First-order Horn clause logic can be extended to a higher-order setting in which function and predicate symbols can be variables and terms are replaced with simply typed λ-terms. For such a logic programming language to be complete in principle, it must incorporate higher-order unification. Although higher-order unification is more complex than usual first-order unification, its availability makes writing certain kinds of programs far more straightforward. In this paper, we present such programs written in a higherorder version of Prolog called λProlog. These programs manipulate structures, such as formulas and programs, which contain abstractions or bound variables. We show how a simple natural deduction theorem prover can be implemented in this language. Similarly we demonstrate how several simple program transformers for a functional programming language can be written in λProlog. These λProlog programs exploit the availability of λ-conversion and higher-order unification to elegantly deal with several of the awkward aspects inherent in these tasks. We argue that writing similar procedures in other languages would yield programs which are much less perspicuous. Submitted to the 1987 IEEE Symposium on Logic Programming. Comments are welcome. Address correspondence to Miller at address above or at “[email protected]”. This work has been supported by NSF AI Center grants NSF-MCS-83-05221, US Army Research office grant ARO-DAA29-84-9-0027, and DARPA N000-14-85-K-0018. The second author has also been supported by a Burroughs contract.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Formulas as Programs

We provide here a computational interpretation of first-order logic based on a constructive interpretation of satisfiability w.r.t. a fixed but arbitrary interpretation. In this approach the formulas themselves are programs. This contrasts with the so-called formulas as types approach in which the proofs of the formulas are typed terms that can be taken as programs. This view of computing is in...

متن کامل

Reportrapport Declarative Programming, First-order Logic, Logic Programming

We p rovide here a computational interpretation of rst-order logic based on a constructive interpretation of satisability w.r.t. a xed but arbitrary interpretation. In this approach the formulas themselves are programs. This contrasts with the so-called formulas as types approach in which the proofs of the formulas are typed terms that can be taken as programs. This view of computing is inspire...

متن کامل

Computing Loops with at Most One External Support Rule for Basic Logic Programs with Arbitrary Constraint Atoms

The well-founded semantics of logic programs is not only an important semantics but also serves as an essential tool for program simplification in answer set computations. Recently, it has been shown that for normal and disjunctive programs, the well-founded models can be computed by unit propagation on program completion and loop formulas of loops with no external support. An attractive featur...

متن کامل

An overview of a proof theoretical approach to reasoning about computation

Typing rules and structural operational semantics are often given via inference rules: that is, the justification of a typing or an evaluation is actually a proof. Thus it is not surprising that proof theory can be used to benefit the specification of and the reasoning about computation. An additional advantage of using proof theory is that it can support such “intensional” aspects of computati...

متن کامل

A logic-based concurrent object-oriented programming language

Parallel computers and distributed systems are becoming increasingly important. Their impressive computation to cost ratios o er a considerable higher performance than that possible with sequential machines. Yet there are few commercial applications written for them. The reason is that programming in these environments is substantially more di cult than programming for sequential machines. In t...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1987